Combining independent solutions to an image or video processing task

ABSTRACT

An algorithm for performing an image or video processing task is generated that may be used to combine a plurality of different independent solutions to the image or video processing task in an optimized manner. A plurality of base algorithms may be applied to a training set of images or video and a first generation of different combining algorithms may be applied to combine the respective solutions from each of the respective base algorithms into respective combined solutions. The respective combined solutions may be evaluated to generate respective fitness scores representing measures of how well the plurality of different combining algorithms each perform the image or video processing task. The algorithms may be iteratively updated to generate an optimized combining algorithm that may be applied to an input image or video.

BACKGROUND Technical Field

This disclosure relates to video or image processing, and more specifically, to combining solutions to an image or video processing task.

Description of the Related Art

A variety of different algorithms often exist to perform the same image or video processing task. For example, Gaussian Mixture Models (GMMs), K-Nearest Neighbors (K-NN), and Self-Balanced Sensitivity Segmenter (SuBSENSE) are each different algorithms that may be used for performing background subtraction on an image. In another example, motion-based algorithms, audio-based algorithms, scene change-based algorithms, or face detection algorithms may each be used for the common task of automatically detecting video highlights in an input video. In these and other examples, different algorithms may produce better results in different situations, which may depend on, for example, object motion, lighting, or other factors.

SUMMARY

The present disclosure satisfies the foregoing needs by providing, inter alia, methods and apparatus for aligning a target image to a reference image in the presence of lens distortion.

In one aspect, a method for generating an algorithm for performing an image or video processing task is disclosed. In one embodiment, the method includes receiving a training set of input images or videos; applying a plurality of base algorithms to the training set, each of the base algorithms independently generating respective base algorithm results as respective solutions to the image or video processing task; applying a first generation of different combining algorithms, where the applying of the first generation of different combining algorithms includes combining the respective solutions from each of the respective base algorithms into respective combined solutions, where the applying of the first generation of different combining algorithms further includes: applying a first subset of a predefined plurality of operations to at least a subset of the respective base algorithms to generate first tier results; and applying a second subset of the predefined plurality of operations to the first tier results of the respective base algorithms results to generate second tier results; evaluating the respective combined solutions from the first generation of different combining algorithms to generate respective fitness scores representing measures of how well the plurality of different combining algorithms each perform the image or video processing task; updating the first generation of different combining algorithms based on the respective fitness scores to generate a second generation of different combining algorithms; and selecting, by a processor, an optimized combining algorithm from the second generation of different combining algorithms that best meets a predefined optimization criterion associated with the image or video processing task; wherein the image or video processing task includes a background segmentation task, wherein each of the plurality of base algorithms includes different background segmentation algorithms, and wherein each of the respective base algorithm results includes respective binary masks generated from a different one of the different background segmentation algorithms.

In one variant, the updating of the first generation of different combining algorithms includes: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and duplicating the parent algorithm to generate an elite child algorithm from the parent algorithm as one of the second generation of different combining algorithms.

In another variant, the updating of the first generation of different combining algorithms includes: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and changing one or more operators, inputs, or structures of the parent algorithm to generate a mutation child algorithm as one of the second generation of different combining algorithms.

In yet another variant, the changing of the one or more operators, inputs, or structures of the parent algorithm includes randomly changing the one or more operators, inputs, or structures of the parent algorithm.

In yet another variant, the updating of the first generation of different combining algorithms includes: selecting a first parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and selecting a second parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and combining a first portion of the first parent algorithm with a second portion of the second parent algorithm to generate a crossover child algorithm as one of the second generation of different combining algorithms.

In yet another variant, the plurality of base algorithms includes at least one of: a Gaussian Mixture Models (GMMs) algorithm, a K-Nearest Neighbors (K-NN) algorithm, and a Self-Balanced Sensitivity Segmenter (SuBSENSE) algorithm.

In yet another variant, the predefined plurality of operations includes at least one of: a 5×5 median filter, a morphological image dilation with a 5×5 square kernel, a morphological image erosion with a 5×5 square kernel, a logical AND operation between two inputs, a logical OR operation between two images, and a majority vote with two or more inputs.

In yet another variant, the image or video processing task includes an automatic highlight detection task, wherein each of the plurality of base algorithms including different automatic highlight detection algorithms, and wherein each of the respective base algorithm results includes a set of parameters indicating a time in a video at which a highlight occurred and a duration of the highlight.

In yet another variant, the plurality of base algorithms includes at least one of: a motion detection algorithm, a scene change detection algorithm, a face detection algorithm, and an audio highlight detection algorithm.

In yet another variant, the predefined plurality of operations includes at least one of: a majority vote for highlights occurring within a same time duration, a logical AND operation of the duration of the highlight, and a logical OR operation of the duration of the highlight (“OR”).

In yet another variant, the method further includes determining whether a stopping criterion is met by the generated second generation of different combining algorithms; when the stopping criterion is met, selecting the optimized combining algorithm from the second generation of different combining algorithms; and otherwise when the stopping criterion is not met, evaluating the second generation of different combining algorithms to generate respective fitness scores.

In a second aspect, a non-transitory computer-readable storage apparatus is disclosed. In one embodiment, the non-transitory computer-readable storage apparatus includes a storage medium for storing instructions for generating an algorithm for performing an image or video processing task, the instructions, when executed by a processor apparatus, being configured to cause the processor apparatus to perform steps including: receiving a training set of input images or videos; applying a plurality of base algorithms to the training set, each of the base algorithms independently generating respective base algorithm results as respective solutions to the image or video processing task; applying a first generation of different combining algorithms, each of the first generation of different combining algorithms being configured to combine the respective solutions from each of the respective base algorithm results into respective combined solutions; evaluating the respective combined solutions from the first generation of different combining algorithms to generate respective fitness scores representing measures of how well the plurality of different combining algorithms each perform the image or video processing task; updating the first generation of different combining algorithms based on the respective fitness scores to generate a second generation of different combining algorithms; and selecting an optimized combining algorithm from the second generation of different combining algorithms that best meets a predefined optimization criterion associated with the image or video processing task; wherein the applying of the first generation of different combining algorithms includes: applying a first subset of a predefined plurality of operations to at least a subset of the respective base algorithm results to generate first tier results; and applying a second subset of the predefined plurality of operations to the first tier results or the respective base algorithm results to generate second tier results; and wherein the image or video processing task includes a background segmentation task, wherein each of the plurality of base algorithms includes different background segmentation algorithms, and wherein each of the respective base algorithm results includes respective binary masks generated from a different one of the different background segmentation algorithms.

In one variant, the updating of the first generation of different combining algorithms includes: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and duplicating the parent algorithm to generate an elite child algorithm from the parent algorithm as one of the second generation of different combining algorithms.

In another variant, the updating of the first generation of different combining algorithms includes: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and changing one or more operators, inputs, or structures of the parent algorithm to generate a mutation child algorithm as one of the second generation of different combining algorithms.

In yet another variant, the changing of the one or more operators, inputs, or structures of the parent algorithm includes a randomly change thereof.

In yet another variant, the updating of the first generation of different combining algorithms includes: selecting a first parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and selecting a second parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and combining a first portion of the first parent algorithm with a second portion of the second parent algorithm to generate a crossover child algorithm as one of the second generation of different combining algorithms.

In yet another variant, the plurality of base algorithms includes at least one of: a Gaussian Mixture Models (GMMs) algorithm, a K-Nearest Neighbors (K-NN) algorithm, and a Self-Balanced Sensitivity Segmenter (SuBSENSE) algorithm.

In yet another variant, the predefined plurality of operations includes at least one of: a 5×5 median filter, a morphological image dilation with a 5×5 square kernel, a morphological image erosion with a 5×5 square kernel, a logical AND operation between two inputs, a logical OR operation between two images, and a majority vote with two or more inputs.

In yet another variant, the image or video processing task includes an automatic highlight detection task, wherein each of the plurality of base algorithms includes different automatic highlight detection algorithms, and wherein each of the respective base algorithm results includes a set of parameters indicating a time in a video at which a highlight occurred and a duration of the highlight.

In yet another variant, the plurality of base algorithms includes at least one of: a motion detection algorithm, a scene change detection algorithm, a face detection algorithm, and an audio highlight detection algorithm.

In yet another variant, the predefined plurality of operations includes at least one of: a majority vote for highlights occurring within a same time duration, a logical AND operation of the duration of the highlight, and a logical OR operation of the duration of the highlight (“OR”).

In yet another variant, the instructions, when executed by the processor apparatus, are further configured to cause the processor apparatus to perform steps including: determining whether a stopping criterion is met by the generated second generation of different combining algorithms; when the stopping criterion is met, selecting the optimized combining algorithm from the second generation of different combining algorithms; and otherwise when the stopping criterion is not met, evaluating the second generation of different combining algorithms to generate respective fitness scores.

Other features and advantages of the present disclosure will be immediately recognized by persons of ordinary skill in the art with reference to the attached drawings and detailed description of exemplary embodiments as given below.

BRIEF DESCRIPTIONS OF THE DRAWINGS

The disclosed embodiments have other advantages and features which will be more readily apparent from the following detailed description of the invention and the appended claims, when taken in conjunction with the accompanying drawings, in which:

Figure (or “FIG.”) 1 illustrates an example embodiment of a media processing system.

FIG. 2 illustrates an embodiment of a process for generating an algorithm for performing an image or video processing task.

FIG. 3 illustrates a tree structure representing an example combining algorithm for combining results of independent base algorithms for solving an image or video processing task.

FIG. 4 illustrates a set of tree structures representing example ways of producing a new generation of combining algorithms from a set of parent algorithms.

FIG. 5 illustrates an embodiment of a process for combining a plurality of independent solutions to an image or video processing task.

FIG. 6 illustrates a tree structure representing an example combining algorithm for combining results of independent base algorithms for solving a background segmentation task.

FIG. 7 illustrates a tree structure representing an example combining algorithm for combining results of independent base algorithms for solving an automatic highlight detection task.

FIG. 8 illustrates an example computer system.

DETAILED DESCRIPTION

The figures and the following description relate to preferred embodiments by way of illustration only. It should be noted that from the following discussion, alternative embodiments of the structures and methods disclosed herein will be readily recognized as viable alternatives that may be employed without departing from the principles of what is claimed.

Reference will now be made in detail to several embodiments, examples of which are illustrated in the accompanying figures. It is noted that wherever practicable similar or like reference numbers may be used in the figures and may indicate similar or like functionality. The figures depict embodiments of the disclosed system (or method) for purposes of illustration only. One skilled in the art will readily recognize from the following description that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles described herein.

Configuration Overview

In an embodiment, a method may generate an algorithm for performing an image or video processing task. A training set of input images or videos may be received. A plurality of base algorithms may be applied to the training set. Each of the base algorithms may independently generate respective base algorithm results as respective solutions to the image or video processing task. A first generation of different combining algorithms may be applied. Each of the first generation of different combining algorithms may combine the respective solutions from each of the respective base algorithms into respective combined solutions. The respective combined solutions from the first generation of different combining algorithms may be evaluated to generate respective fitness scores representing measures of how well the plurality of different combining algorithms each perform the image or video processing task. The first generation of different combining algorithms may be updated based on the respective fitness scores to generate a second generation of different combining algorithms. An optimized combining algorithm may be selected from the second generation of different combining algorithms that may best meet a predefined optimization criterion associated with the image or video processing task.

In another embodiment, a non-transitory computer-readable storage medium may store instructions that when executed by a processor cause the processor to generate an algorithm for performing an image or video processing task according to the process described above.

In another embodiment, a computing device may comprise a processor and a non-transitory computer-readable storage medium that may store instructions that when executed by the processor, cause the processor to generate an algorithm for performing an image or video processing task according to the process described above.

Media Processing System

FIG. 1 is a block diagram of a media processing system 100. The media processing system may comprise an offline combining algorithm generation system 110 and an online processing system 120. The offline combining algorithm generation system 110 may generally operates in an offline manner to generate an optimizing combining algorithm 106 from a set of training images or videos 102. Once the optimized combining algorithm 106 is generated, the online processing system 130 may operate in an online manner to apply the optimizing combining algorithm 106 to input images or video 104 to generate a combined output result 108.

In an embodiment, the offing combining algorithm generation system 110 may receive a plurality of training images or videos 102 and apply a plurality of different base algorithms (e.g., base algorithms 1, . . . , N) by respective processing modules 112 (e.g., processing modules 112-1, . . . , 112-N). Each of the processing modules 112 generates a respective base algorithm result, which provides an independent solution to an image or video processing task. For example, the processing modules 112 may each apply a different base algorithm to generate an independent solution to a background segmentation task. In another embodiment, the processing modules 112 may each apply a different base algorithm to generate an independent solution to an automatic highlight detection task. In yet other embodiments, the processing modules 112 may each apply a different base algorithm to generate an independent solution to tasks such as, for example, an object tracking task, an image registration or alignment task, an image classification task, an image stitching task, or other image or video processing task for which multiple independent algorithms exist for generating solutions. A combining algorithm optimizer 120 determines an optimized combining algorithm 106 for combining the respective base algorithm results into a combined result. The combining algorithm optimizer 120 may determine the optimized combining algorithm 106 based on a predefined optimization criterion and a set of predefined constraints limiting how the base algorithms results may be combined. For example, the constraints may dictate a predefined set of operators that can be applied at each step of the combining algorithm, a predefined maximum number of operations in the combining algorithm, or other parameters that limit the characteristics of the combining algorithm. The optimization criterion may comprise a metric indicating how well the combining algorithm operates to achieve the desired image or video processing task for the set of training images or video 102.

Once the optimized combining algorithm 106 is determined, it may be used by the online processing system 120. In the online processing system 120, a plurality of processing modules 122 (e.g., processing module 122-1, . . . , 122-N) each apply respective base algorithms (e.g., base algorithms 1, . . . N, which may be the same as the base algorithms applied by the processing modules 112) to an input image or video 104 to generate respective base algorithm results. An optimized combining module 124 may then apply the optimized combining algorithm 106 to combine the respective base algorithm results into a combined output result 108. The combined output result 108 may represent a solution to the image or video processing task solved by the base algorithms which achieves better performance than any of the individual base algorithms.

As a representative example, the media processing system 100 may be configured to perform a background segmentation task. Here, the offline combining algorithm generation system 110 may comprises a first processing module 112-1 that performs a GMM algorithm for background segmentation, a second processing module 112-2 that performs a K-NN algorithm for background segmentation, and a third processing module 112-3 that performs a SuBSENSE algorithm for background segmentation. The online processing system 130 may similarly include a first processing module 122-1 that performs a GMM algorithm for background segmentation, a second processing module 122-2 that performs a K-NN algorithm for background segmentation, and a third processing module 122-3 that performs a SuBSENSE algorithm for background segmentation. Each of these base algorithms may generate respective binary masks as baseline algorithm output results that represent the segmented foreground and background. The respective binary masks generated from each algorithm 112 may be slightly different because the algorithms operate independently of each other and are based on different principles to achieve the segmentation task. Furthermore, different algorithms may have higher performance under different conditions such as, for example, lighting conditions, object motion conditions, or other conditions that may affect the visual appearance of the training images or videos 102. In the offline combining algorithm generation system 110, the combining algorithm optimizer 120 may determine an algorithm for combining the binary masks generated by each of the base algorithms into a combined binary mask that achieves a better representation of the segmented foreground and background (e.g., according to some optimization metric) than any of the individual base algorithms over a wide variety of conditions. For example, the optimized combining algorithm may comprise a set of operations (e.g., summing operations, difference operations, filtering operations, binary operations, etc.) performed on the binary masks outputted from the base algorithms. The online processing system 120 may then apply the optimized combining algorithm 106 to a set of binary masks generated from the different background segmentations algorithms when applied to an input image or video 104 to generate a combined binary mask as the combined output result 108.

In another example embodiment, the media processing system 100 may be applied to a different image or video processing task. For example, in one embodiment, each of the processing modules 112 and processing modules 122 may perform a different automatic highlight detection algorithm that each output a set of parameters indicating where a highlight is found in a video. For example, different ones of the processing modules 112, 122 may apply a face detection algorithm, an audio highlight detection algorithm, a motion detection algorithm, and a scene change detection algorithm that each independently determines a range of video frames where a highlight is detected. The combining algorithm optimizer 120 may determine an optimized combining algorithm 106 for combining these highlight detection parameters to achieve a combined result that achieves better performance at accurately detecting highlights (e.g., according to some optimization criterion) over a variety of conditions present in the training images and video 102. The online processing system 130 may then apply the optimized combining algorithm 106 to generate a combined output result 108 for an input image or video. In yet other embodiments, the media processing system 100 may be applied to performing an object tracking task, an image registration or alignment task, an image classification task, a stitching task, or other image or video processing task.

The combining algorithm optimizer 120 may comprise a plurality of combining modules 114, an algorithm updater 116, and a combining algorithm selector 118. The combining modules 114 may each apply a different combining algorithm that combines the results from the base algorithms in a different way. The results of each of these different combining algorithms may be analyzed and updated by the algorithm updater 116 in a manner that generally increases the performance of the combining algorithms over time (e.g., with respect to a performance metric associated with evaluating the image or video processing task). The process of applying the different combining algorithms in the combining modules 114 and updating the algorithms in the algorithm updater 116 may iterate until a stopping criterion is met (e.g., a threshold number of iterations have been completed or a desired performance metric has been met). Once the stopping criterion is met, the combining algorithm selector 118 may select the best combining algorithm (e.g., highest performing according to a performance metric for the image or video processing task) as the optimized combining algorithm 106. A process for optimizing the combining algorithm as performed by the combining algorithm optimizer 120 is described in further detail below with respect to FIG. 2.

In an embodiment, the offline combining algorithm generation system 110 may be implemented as, for example, one or more processors and a non-transitory computer-readable storage medium storing instructions that when executed by the one or more processors carries out the functions attributed to the offline combining algorithm generation system 110 and the associated processes described below. Similarly, the online processing system 130 may be implemented as, for example, one or more processors and a non-transitory computer-readable storage medium storing instructions that when executed by the one or more processors carries out the functions attributed to the online processing system 110 and the processes described below. In different embodiment embodiments, the offline combining algorithm generation system 110 and online processing system 130 may partly or wholly be implemented within the same physical system such that at least some of functions attributed to each are performed by the same processor or using a common set of instructions. For example, the processing modules 112 and processing modules 122 may be implemented by a common set of instructions that performs the associated baseline algorithm. In other embodiments, the offline combining algorithm generation system 110 and online processing system 130 may be wholly or partly implemented in different physical systems. In different embodiments, all or parts of the media processing system 100 may be implemented in, for example, a video server, a personal computer, a mobile device, a camera, or other processing device. An example of a computer system that may correspond to all or part of the offline combining algorithm generation system 110 and online processing system 130 is illustrated in FIG. 8 described in further detail below.

FIG. 2 illustrates an embodiment of a process for generating a combining algorithm that may combine solutions from two or more base algorithms for an image or video processing task. An initial population of combining algorithms may be created 202. Each combining algorithms in the initial population may combine a plurality of results from the different base algorithms based on a hierarchical set of operations. Examples of two different generic combining algorithms are illustrated in FIG. 3. Here, a plurality of solutions S1, S2, S3 may represent outputs of the base algorithms for performing a particular image or video processing task. These solutions S1, S2, S3 may be combined according to a plurality of predefined operators O1, O2, O3, O4 arranged in a tree structure in which each input solution represents a “leaf” in the tree and each operator represents a “node.” For example, the example algorithm 302 in FIG. 3 may be represented by the following function: O₄(O₂(O₃(O₁(S₁,S₂)),S₁),O₁(O₂(S₁,S₂,S₃)))

Furthermore, the algorithm 304 in FIG. 3 may be represented by the following function: O₂((O₁(O₃(S₁,S₂)),S₃),S3)

Each of these combining algorithms 302, 304 may combine the base solutions S1, S2, S3 in different ways, according to different tree structures in which leafs may be selected from the set of base solutions and nodes may be selected from the set of operators O1, O2, O3, O4. In one embodiment, each of the combining algorithms in the initial population may be randomly generated within a predefined set of parameters that may limit, for example, the set of input solutions, the set of possible operators, or the size or structure of the tree. Although only two algorithms are shown in the example population of FIG. 3, a population may include a significantly number of combining algorithms.

Referring back to FIG. 2, each of the combining algorithms may then be evaluated 204 to generate respective fitness scores. For example, each of the combining algorithms may be performed on the outputs of the base algorithms to generate respective output results, and the output results may be scored based on a quality metric to determine which combining algorithms perform best to achieve the desired task.

“Children” algorithms may then be generated based on the initial population of combining algorithms and their respective fitness scores. In one embodiment, the children algorithms can be generated in three different ways: (1) as “elite children”; (2) as “crossover children”; and (3) as “mutation children.” FIG. 4 illustrates examples of each of these. In the example of FIG. 4, an elite child 404 may be generated as a direct copy of a parent algorithm 402. A mutation child 408 may be generated by randomly changing one or more aspects of the tree structure of a parent algorithm 406. For example, in the illustrated example, a node that performs the operation O2 is change to instead perform the operation O3. A crossover child 414 may be generated by combining aspects of two different parent algorithms 410, 412. Here, a node (and any nodes below it in the tree structure) of a first parent algorithm may be replaced with a node (and any nodes below it in the tree structure) of a second parent algorithm. Thus, in the illustrated example, the leaf node S2 in a first parent algorithm 410 may be replaced with the structure including leaf nodes S1, S2 and operator node O2 from a second parent algorithm 412 to generate the crossover child 414.

In one embodiment, only a subset of algorithms in a population may be selected to be parents for forming the next generation of algorithms. The algorithms that are selected as parents for the next generation may be randomly selected according to a probability distribution that favors higher scoring algorithms. The type and number of children generated from each parent may also be randomly selected according to a probability distribution within some constraining parameters. This makes it more likely that higher performing algorithms will pass on traits to the next generation of algorithms, thus causing the population of algorithms to generally improve as the number of iterations increases. Furthermore, in one embodiment, the highest performing algorithms may be automatically selected to produce elite children, thus ensuring that the highest performing algorithms are kept in the population.

Referring back to FIG. 2, after the next generation of combining algorithms is generated, it may then be determined 208 if the new population of children algorithms meets a stopping criterion. The stopping criterion may be, for example, that a predefined number of generations have been produced or that a combining algorithm in the current population meets a predefined performance criterion. If the stopping criterion is not met, the algorithm may repeat to step 204 and the process iterates beginning with the new generation of combining algorithms. If the stopping criterion is met, the highest scoring algorithm (e.g., best performing) may be selected 210 as the optimized combining algorithm that may be used by the online processing system 120 algorithm to combine multiple different solutions to an image or video processing task.

FIG. 5 is a flowchart illustrating an embodiment of a process for performing an image or video processing task by combining outputs from multiple independent base algorithms. An input image or video may be received 502. A plurality of different base algorithms may be applied to the input image or video to generate a plurality of base algorithm outputs providing respective results of the image or video processing task. A combining algorithm may be applied 506 (e.g., as generated by the offline combining algorithm generation system 110 for the particular image or video processing task) to combine the base algorithm outputs to generate a combined output.

FIG. 6 illustrates an embodiment of a specific combining algorithm 600 for combining independent solutions to a background segmentation image or video processing task. Here, the inputs to the combining algorithm 600 may comprise outputs (e.g., in the form of binary masks) from a Gaussian Mixture Model algorithm (“GMM”), a K-Nearest Neighbors algorithm (“K-NN”), and a Self-Balanced Sensitivity Segmenter algorithm (“SuBSENSE”) generated based on an input image. Furthermore, the operators are as follows: (1) a 5×5 median filter (“MF”); (2) a morphological image dilation with a 5×5 square kernel (“DIL”); (3) a morphological image erosion with a 5×5 square kernel (“ERO”); (4) a logical AND operation between two images (“AND”), (5) a logical OR operation between two images (“OR”); and (6) a majority vote with two or more images (“MV”). The binary masks from the different base algorithms are combined according to the operations shown to generate a combined output result.

FIG. 7 illustrates an embodiment of a specific combining algorithm 700 for combining independent solutions to an automatic highlight detection video processing task. Here, the inputs to the combining algorithm 700 may comprise outputs from a motion detection algorithm (“Motion”), a scene change detection algorithm (“Scene Changes”), a face detection algorithm (“Face Det.”), and an audio highlight detection algorithm “Audio”). These inputs may each be in the form of a set of parameters indicating a time in the video at which the highlight occurred and a specified duration of how long the highlight occurs. The operators applied to these parameters may be as follows: (1) a majority vote for highlights occurring within the same time duration (“MV”); (2) a logical AND operation of the duration of the highlight (“AND”); and (3) a logical OR operation of the duration of the highlight (“OR”). The parameters detected by each of the base algorithms may be combined according to the operations shown to generate a combined output result.

In another embodiment, a combining algorithm (which may be automatically generated according to the processes described above) may combine outputs of solutions from different object tracking algorithms to generate a combined solution to the tracking problem. The combined solution may be beneficial since some tracking algorithms track color better while others track edges or other image parameters better.

In another embodiment, a combining algorithm (which may be automatically generated according to the processes described above) may combine outputs of solutions from different image registration or alignment algorithms to generate a combined solution to the image registration or alignment problem. For example, in one embodiment, an image may be tiled or sectioned into various blocks and different image registration or alignment algorithms may be applied to each tile or section. The sections can then be combined using the combining algorithm to achieve a combined result.

In another embodiment, a combining algorithm (which may be automatically generated according to the processes described above) may combine outputs of solutions from different image classification algorithms to generate a combined solution to the image classification problem. For example, each of the image classification algorithms may generate a scene similarity measure in a different way, and these scene similarity measures can be combined according to the combining algorithm to achieve a combined result.

In another embodiment, a combining algorithm (which may be automatically generated according to the processes described above) may combine outputs of solutions from different image stitching algorithms to generate a combined solution to the stitching problem. For example, different stitching algorithms may be based on blending of edges, three-dimensional warps, aligning features, or other independent techniques. The solutions can be combined according to the combining algorithm to achieve a combined result.

Computing Machine Architecture

FIG. 8 is a block diagram illustrating components of an example machine able to read instructions from a machine-readable medium and execute them in a processor (or controller) which may be used to carry out any of the processes described herein. Specifically, FIG. 8 shows a diagrammatic representation of a machine in the example form of a computer system 800 within which instructions 824 (e.g., software) for causing the machine to perform any one or more of the methodologies discussed herein may be executed. In alternative embodiments, the machine may operate as a standalone device or may be connected (e.g., networked) to other machines. In a networked deployment, the machine may operate in the capacity of a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment.

The machine may be a server computer, a client computer, a personal computer (PC), a tablet PC, a set-top box (STB), a personal digital assistant (PDA), a cellular telephone, a smartphone, a web appliance, a network router, switch or bridge, or any machine capable of executing instructions 824 (sequential or otherwise) that specify actions to be taken by that machine. Further, while only a single machine is illustrated, the term “machine” may also be taken to include any collection of machines that individually or jointly execute instructions 824 to perform any one or more of the methodologies discussed herein.

Looking closer at the example computer system 800, it may include one or more processors 802 (generally processor 802) (e.g., a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), one or more application specific integrated circuits (ASICs), one or more radio-frequency integrated circuits (RFICs), or any combination of these), a main memory 804, and a static memory 806, which are configured to communicate with each other via a bus 808. The computer system 800 may further include graphics display unit 810 (e.g., a plasma display panel (PDP), a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)). The computer system 800 may also include alphanumeric input device 812 (e.g., a keyboard), a cursor control device 814 (e.g., a mouse, a trackball, a joystick, a motion sensor, or other pointing instrument), a storage unit 816, a signal generation device 818 (e.g., a speaker), and a network interface device 820, which also are configured to communicate via the bus 808.

The storage unit 816 may include a machine-readable medium 822 on which is stored instructions 824 (e.g., software) embodying any one or more of the methodologies or functions described herein. The instructions 824 (e.g., software) may also reside, completely or at least partially, within the main memory 804 or within the processor 802 (e.g., within a processor's cache memory) during execution thereof by the computer system 800, the main memory 804 and the processor 802 also constituting machine-readable media. The instructions 824 (e.g., software) may be transmitted or received over a network 826 via the network interface device 820.

While machine-readable medium 822 is shown in an example embodiment to be a single medium, the term “machine-readable medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) able to store instructions (e.g., instructions 824). The term “machine-readable medium” shall also be taken to include any medium that is capable of storing instructions (e.g., instructions 824) for execution by the machine and that cause the machine to perform any one or more of the methodologies disclosed herein. The term “machine-readable medium” may include, but not be limited to, data repositories in the form of solid-state memories, optical media, and magnetic media.

ADDITIONAL CONFIGURATION CONSIDERATIONS

Throughout this specification, some embodiments have used the expression “coupled” along with its derivatives. The term “coupled” as used herein is not necessarily limited to two or more elements being in direct physical or electrical contact. Rather, the term “coupled” may also encompass two or more elements are not in direct contact with each other, but yet still co-operate or interact with each other, or are structured to provide a thermal conduction path between the elements.

Likewise, as used herein, the terms “comprises,” “comprising,” “includes,” “including,” “has,” “having” or any other variation thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

In addition, use of the “a” or “an” are employed to describe elements and components of the embodiments herein. This is done merely for convenience and to give a general sense of the invention. This description should be read to include one or at least one and the singular also includes the plural unless it is obvious that it is meant otherwise.

Finally, as used herein any reference to “one embodiment” or “an embodiment” means that a particular element, feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.

Upon reading this disclosure, those of skill in the art will appreciate still additional alternative structural and functional designs for the described embodiments as disclosed from the principles herein. Thus, while particular embodiments and applications have been illustrated and described, it is to be understood that the disclosed embodiments are not limited to the precise construction and components disclosed herein. Various modifications, changes and variations, which will be apparent to those skilled in the art, may be made in the arrangement, operation and details of the method and apparatus disclosed herein without departing from the scope defined in the appended claims. 

The invention claimed is:
 1. A method for generating an algorithm for performing an image or video processing task, the method comprising: receiving a training set of input images or videos; applying a plurality of base algorithms to the training set, each of the base algorithms independently generating respective base algorithm results as respective solutions to the image or video processing task; applying a first generation of different combining algorithms, where the applying of the first generation of different combining algorithms comprises combining the respective solutions from each of the respective base algorithms into respective combined solutions, where the applying of the first generation of different combining algorithms further comprises: applying a first subset of a predefined plurality of operations to at least a subset of the respective base algorithms to generate first tier results; and applying a second subset of the predefined plurality of operations to the first tier results of the respective base algorithms results to generate second tier results; evaluating the respective combined solutions from the first generation of different combining algorithms to generate respective fitness scores representing measures of how well the plurality of different combining algorithms each perform the image or video processing task; updating the first generation of different combining algorithms based on the respective fitness scores to generate a second generation of different combining algorithms; and selecting, by a processor, an optimized combining algorithm from the second generation of different combining algorithms that best meets a predefined optimization criterion associated with the image or video processing task; wherein the image or video processing task comprises a background segmentation task, wherein each of the plurality of base algorithms comprises different background segmentation algorithms, and wherein each of the respective base algorithm results comprises respective binary masks generated from a different one of the different background segmentation algorithms.
 2. The method of claim 1, wherein the updating of the first generation of different combining algorithms comprises: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and duplicating the parent algorithm to generate an elite child algorithm from the parent algorithm as one of the second generation of different combining algorithms.
 3. The method of claim 1, wherein the updating of the first generation of different combining algorithms comprises: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and changing one or more operators, inputs, or structures of the parent algorithm to generate a mutation child algorithm as one of the second generation of different combining algorithms.
 4. The method of claim 3, wherein the changing of the one or more operators, inputs, or structures of the parent algorithm comprises randomly changing the one or more operators, inputs, or structures of the parent algorithm.
 5. The method of claim 1, wherein the updating of the first generation of different combining algorithms comprises: selecting a first parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and selecting a second parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and combining a first portion of the first parent algorithm with a second portion of the second parent algorithm to generate a crossover child algorithm as one of the second generation of different combining algorithms.
 6. The method of claim 1, wherein the plurality of base algorithms comprises at least one of: a Gaussian Mixture Models (GMMs) algorithm, a K-Nearest Neighbors (K-NN) algorithm, and a Self-Balanced Sensitivity Segmenter (SuB SENSE) algorithm.
 7. The method of claim 1, wherein the predefined plurality of operations comprises at least one of: a 5×5 median filter, a morphological image dilation with a 5×5 square kernel, a morphological image erosion with a 5×5 square kernel, a logical AND operation between two inputs, a logical OR operation between two images, and a majority vote with two or more inputs.
 8. The method of claim 1, wherein the image or video processing task comprises an automatic highlight detection task, wherein each of the plurality of base algorithms comprises different automatic highlight detection algorithms, and wherein each of the respective base algorithm results comprises a set of parameters indicating a time in a video at which a highlight occurred and a duration of the highlight.
 9. The method of claim 8, wherein the plurality of base algorithms comprises at least one of: a motion detection algorithm, a scene change detection algorithm, a face detection algorithm, and an audio highlight detection algorithm.
 10. The method of claim 8, wherein the predefined plurality of operations comprises at least one of: a majority vote for highlights occurring within a same time duration, a logical AND operation of the duration of the highlight, and a logical OR operation of the duration of the highlight (“OR”).
 11. The method of claim 1, further comprising: determining whether a stopping criterion is met by the generated second generation of different combining algorithms; when the stopping criterion is met, selecting the optimized combining algorithm from the second generation of different combining algorithms; and otherwise when the stopping criterion is not met, evaluating the second generation of different combining algorithms to generate respective fitness scores.
 12. A non-transitory computer-readable storage apparatus comprising a storage medium storing instructions for generating an algorithm for performing an image or video processing task, the instructions, when executed by a processor apparatus, being configured to cause the processor apparatus to perform steps including: receiving a training set of input images or videos; applying a plurality of base algorithms to the training set, each of the base algorithms independently generating respective base algorithm results as respective solutions to the image or video processing task; applying a first generation of different combining algorithms, each of the first generation of different combining algorithms being configured to combine the respective solutions from each of the respective base algorithm results into respective combined solutions; evaluating the respective combined solutions from the first generation of different combining algorithms to generate respective fitness scores representing measures of how well the plurality of different combining algorithms each perform the image or video processing task; updating the first generation of different combining algorithms based on the respective fitness scores to generate a second generation of different combining algorithms; and selecting an optimized combining algorithm from the second generation of different combining algorithms that best meets a predefined optimization criterion associated with the image or video processing task; wherein the applying of the first generation of different combining algorithms comprises: applying a first subset of a predefined plurality of operations to at least a subset of the respective base algorithm results to generate first tier results; and applying a second subset of the predefined plurality of operations to the first tier results or the respective base algorithm results to generate second tier results; and wherein the image or video processing task comprises a background segmentation task, wherein each of the plurality of base algorithms comprises different background segmentation algorithms, and wherein each of the respective base algorithm results comprises respective binary masks generated from a different one of the different background segmentation algorithms.
 13. The non-transitory computer-readable storage apparatus of claim 12, wherein the updating of the first generation of different combining algorithms comprises: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and duplicating the parent algorithm to generate an elite child algorithm from the parent algorithm as one of the second generation of different combining algorithms.
 14. The non-transitory computer-readable storage apparatus of claim 12, wherein the updating of the first generation of different combining algorithms comprises: selecting a parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and changing one or more operators, inputs, or structures of the parent algorithm to generate a mutation child algorithm as one of the second generation of different combining algorithms.
 15. The non-transitory computer-readable storage apparatus of claim 12, wherein the changing of the one or more operators, inputs, or structures of the parent algorithm comprises a randomly change thereof.
 16. The non-transitory computer-readable storage apparatus of claim 12, wherein the updating of the first generation of different combining algorithms comprises: selecting a first parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and selecting a second parent algorithm from the first generation of different combining algorithms based on the respective fitness scores; and combining a first portion of the first parent algorithm with a second portion of the second parent algorithm to generate a crossover child algorithm as one of the second generation of different combining algorithms.
 17. The non-transitory computer-readable storage apparatus of claim 12, wherein the plurality of base algorithms comprises at least one of: a Gaussian Mixture Models (GMMs) algorithm, a K-Nearest Neighbors (K-NN) algorithm, and a Self-Balanced Sensitivity Segmenter (SuBSENSE) algorithm.
 18. The non-transitory computer-readable storage apparatus of claim 12, wherein the predefined plurality of operations comprises at least one of: a 5×5 median filter, a morphological image dilation with a 5×5 square kernel, a morphological image erosion with a 5×5 square kernel, a logical AND operation between two inputs, a logical OR operation between two images, and a majority vote with two or more inputs.
 19. The non-transitory computer-readable storage apparatus of claim 12, wherein the image or video processing task comprises an automatic highlight detection task, wherein each of the plurality of base algorithms comprises different automatic highlight detection algorithms, and wherein each of the respective base algorithm results comprises a set of parameters indicating a time in a video at which a highlight occurred and a duration of the highlight.
 20. The non-transitory computer-readable storage apparatus of claim 19, wherein the plurality of base algorithms comprises at least one of: a motion detection algorithm, a scene change detection algorithm, a face detection algorithm, and an audio highlight detection algorithm.
 21. The non-transitory computer-readable storage apparatus of claim 19, wherein the predefined plurality of operations comprises at least one of: a majority vote for highlights occurring within a same time duration, a logical AND operation of the duration of the highlight, and a logical OR operation of the duration of the highlight (“OR”).
 22. The non-transitory computer-readable storage apparatus of claim 12, wherein the instructions, when executed by the processor apparatus, are further configured to cause the processor apparatus to perform steps including: determining whether a stopping criterion is met by the generated second generation of different combining algorithms; when the stopping criterion is met, selecting the optimized combining algorithm from the second generation of different combining algorithms; and otherwise when the stopping criterion is not met, evaluating the second generation of different combining algorithms to generate respective fitness scores. 